//
//  UIImageView+Extension.swift
//  SmartEyeForPatient
//
//  Created by qdsg on 2021/8/10.
//

import Foundation

extension UIImageView {
    /// 图片点击放大浏览
    func addImageBrownTap() {
        let tap = UITapGestureRecognizer(target: self, action: #selector(imageBrownTap(_:)))
        self.isUserInteractionEnabled = true
        self.addGestureRecognizer(tap)
    }

    @objc private func imageBrownTap(_ tap: UITapGestureRecognizer) {
        presentImageBrowser(imageView: self, originalUrl: nil)
    }
}
